import React from 'react';
import {
  HomeOutlined,
  AccountBookOutlined,
  SolutionOutlined,
  TeamOutlined,
  DeploymentUnitOutlined,
  MenuOutlined,
  SettingOutlined,
  FireOutlined,
} from '@ant-design/icons';

export const routes = [
  {
    name: '首页',
    key: 'home',
    path: '/main/home',
    component: '../pages/Home',
    icon: <HomeOutlined />,
  },
  {
    name: '流水',
    key: 'flowing',
    path: '/main/flowing',
    component: '../pages/Flowing',
    icon: <AccountBookOutlined />,
  },
  {
    name: '客户',
    key: 'customer',
    path: '/main/customer',
    component: '../pages/Customer',
    icon: <SolutionOutlined />,
  },
  {
    name: '员工',
    key: 'staff',
    path: '/main/staff',
    component: '../pages/Staff',
    icon: <TeamOutlined />,
  },
  {
    name: '物料',
    key: 'goods',
    path: '/main/goods',
    component: '../pages/Goods',
    icon: <DeploymentUnitOutlined />,
  },
  {
    name: '更多',
    key: 'more',
    path: '/main/more',
    icon: <MenuOutlined />,
    routes: [
      {
        name: '基础设置',
        key: 'setting',
        path: '/main/more/setting',
        component: '../pages/Setting',
        icon: <SettingOutlined />,
      },
      {
        name: '关于软件',
        key: 'about',
        path: '/main/more/about',
        component: '../pages/About',
        icon: <FireOutlined />,
      },
    ],
  },
];

export default [
  {
    path: '/',
    component: '../layouts/BasicLayout',
    routes: [{ path: '/', redirect: '/main/index' }, ...routes],
  },
];
